home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
UTIL
/
Edit II 2.2.1.sit
/
Edit II 2.2.1
/
Edit II Doc
next >
Wrap
Text File
|
1993-03-11
|
20KB
|
598 lines
Edit II Version 2.2.1 (March 11, 1995) Page 1
Edit II Version 2.2.1
ゥ 1990-95 Kenneth Seah
Portions ゥ by Symantec
An enhanced text editor for the Macintosh
0. Prologue
This application is copyrighted by Kenneth Seah and is distributed as
shareware. You are welcome to try out Edit II for a week or two and if you
decide that it's something you want to use, send a check drawn on a US Bank
or a draft for US$15 (US$18 if you want a disk with the latest release)
made out to me at the address below, enclosing the little questionnaire on
page 11. Iユll answer your problems and consider bug fixes via electronic
mail (Internet or America OnLine) if you are registered. As a registered
user, you may obtain the latest release at all times from one of the above
services (you have to bear the online connect and download charges but
otherwise all upgrades are free). If you do not have access to any of the
services, send US$3 to the address below and Iユll mail you a disk with the
latest release.
Otherwise, give a copy of it to a friend, enclosing this file too and trash
your copy (since it takes up valuable space on your disk).
I'll consider that you have been registered once you have sent in your
shareware fee. Upgrades will be posted to America OnLine and Internet. I
can work out a ヤsite licenceユ fee if you need several copies installed at
your place.
For commercial distribution and correspondence, please contact:
Kenneth Seah
P O Box 8565
Austin, TX 78713-8565
America OnLine: KSeah (kseah@aol.com)
Internet: kseah@procyon.austin.tx.us
1. Introduction
Edit II is intended as a replacement for the Consulair Edit text editor but
which allows the use of the cursor keys on the Mac keyboard for navigation.
It is not, however, a product of Consulair and is not a revision of the
Edit application.
The num lock LED on the extended keyboard is used to indicate whether the
cursor pad or the numeric pad mode is on. The home, end, page up, page down
keys will also work, as will the delete right (del) key. One level of undo
is supported. You can launch Edit II by double clicking old Edit files
(since Edit II uses the same creator signature as Edit, that is, EDIT).
This means that you might want to rebuild the desktop after installing Edit
II.
Edit II requires System Software 4.1 or later and above and is
Multifinder-friendly. It is also 32-bit clean and runs fine under System 7.
Edit II now handles System 7 stationery documents.
This program is compiled using Symantec C 7.0.3 and uses the Cappsユ Editor
Toolkit.
2. Menus
Edit II works just like Consulairユs Edit. Each of the menus and their
respective commands are described in the subsequent paragraphs.
File menu
New
Creates a new window named ヤUntitled-Nユ for editing, where N is a number
starting at 1.
Open...
Displays the standard file open dialog box to allow the selection of a file
to edit. The dialog box will display all files of type ヤTEXTユ, ヤRRRSユ (Red
Ryder script files) and ヤttroユ (TeachText read-only text files). Stationery
documents under System 7 will be opened as ヤUntitled-Nユ windows. Holding
down the option key while selecting open will show all files.
Close
Closes the frontmost editing window. If the file has been changed in any
way, the standard file save dialog box will be displayed.
Save
Saves the frontmost window to its file on disk. If the file has not been
previously saved, perform a ヤSave As...ユ operation.
Save As...
Saves the frontmost window to a differently named file by presenting the
standard file save dialog box. The dialog box also allows you to select
which line termination character you want to use (Mac uses control-M, DOS
uses control-M control-J while UNIX uses control-J.
Revert
Reverts the frontmost window to the most recently saved version of the
file. A prompt message is displayed to confirm the action.
Page Setup...
Displays the standard printer Page Setup dialog box.
Print
Displays the standard printer Print dialog box to initiate printing of the
frontmost window.
Transfer
Displays the standard file selection dialog box to choose an application
program to run.
Quit
Quits Edit II after prompting for saving of any changed windows.
Edit menu
Undo
Reverts from the previous editing operation.
Cut
Removes the currently selected text and copies it into the clipboard.
Copy
Copies the currently selected text into the clipboard without deleting it.
Paste
Pastes the clipboard text at the insertion point. If a range has been
selected, then the pasted text will replace the selection.
Clear
Deletes the currently selected text without copying it to the clipboard.
Select All
Selects all the text in the frontmost window.
Search menu
Find...
Displays the ヤfind and replaceユ dialog box for entry of search (Find) and
replacement (Replace with) strings. GREP-style searching is available (see
later on how to define GREP search and replacement strings). The ヤfind and
replaceユ dialog box has several options:
ヤMatch Wordsユ will only flag a match if there is an exact word for word
match with the search string.
ヤWrap Aroundユ will flag matches even when the words wrap over at the end of
a line.
ヤIgnore Caseユ will flag matches even when the cases (capitals and small
letters) do not match but the letters do.
There is an option to do multi-file searches of all TEXT-type files inside
a folder. The multi-file search is activated by clicking on the Multi-File
Search checkbox which brings up the standard file selection dialog box.
Selecting a TEXT-type file will initiate multi-file searches of the search
string for all TEXT-type files within the folder. Note that multi-file
searching does not descend into subfolders (i.e. one folder level only).
Cutting and pasting of text selections is allowed into the search and
replacement strings in the ヤfind and replaceユ dialog box. This is achieved
by using the command-C and command-V combinations. If you want to enter the
tab or return characters in the Find dialog box, key in command-tab and
command-return respectively.
Search and replacement strings are retained between searches. The ヤDonユt
Findユ button will retain the search and replacement string entries but will
not initiate any searches. The ヤCancelユ button on the other hand, will
ignore any entries made for these strings.
Enter Selection
Puts the currently selected text into the search string.
Replace
Replaces the currently selected text with the replacement string.
Replace and Find Again
Replaces the currently selected text with the replacement string and
searches for the next occurrence of the search string.
Replace All...
Replaces all occurrences of the search string with the replacement string.
Prompts for confirmed replacement if required.
Find in Next File
Only operable under multi-file searches ミ will look for occurrence of the
search string in the next file in the specified folder.
Go to Top
Go to Bottom
Move the insertion point to the beginning or end of the file, respectively.
Go to Line#...
Displays a dialog and moves to the specified line.
Goodies menu
Shift Left
Shift Right
Moves the selected text one space to the left or right.
Balance
Extends current selection to encompass the next level of enclosing braces
{}, brackets [] or parentheses (). A beep means that the text could not be
balanced. [Great for C and Lisp people!]
Add LFs
Adds linefeed characters to the end of every line.
Strip LFs
Removes linefeed characters from the text.
Wrap to Column...
Wraps the text to a user-specified column, default is the window wrap
column.
Wrap to Window
Wraps the text to the window width.
Unwrap
Almost the reverse of the above wraps. What Unwrap does is to replace all
single occurrences of the ヤreturnユ character by a space and leave multiple
runs of returns untouched. Thus a ヤparagraphユ is recognized as ending in
two or more returns.
Tabs to Spaces
Spaces to Tabs
Converts tabs to spaces based on the current メnumber of spaces to tabsモ
settings, and vice versa.
Remove Invisibles
Removes all the invisible (non-printing) characters with the exceptions of
tab, return and linefeed.
Options menu
Font
Size
Creator
Select the font, size and creator for the file being edited. The size
submenu has ヤLargerユ, ヤSmallerユ and ヤOther...ユ commands to allow for
selection of non-standard sizes. The creators supported by Edit II are:
EDIT Consulair Edit (and Edit II)
MPS Apple MPW
KAHL Think C/Think Project Manager
PJMM Think Pascal
ALFA Alpha
MACA MacWrite
MSWD Microsoft Word
nX^n WriteNow
ttxt TeachText
PEDT DA Edit or PEdit
WNGZ WingZ
WPC2 WordPerfect
L123 Lotus 1-2-3
CIM CompuServe Information Manager
MRIP TScript
Rich BBEdit
AOqc America Online
Default font is Monaco, default size is 9 and default creator is EDIT.
Set Tabs...
Sets the number of spaces to one tab stop for the topmost window(default is
set in the preferences dialog. Initially 4 spaces to the tab).
Set Wrap...
Sets the column at which the text will be wrapped at (actually the first
space typed after this column causes the wrap, and not the same as doing a
ヤWrap to Column...ユ). Default is specified in the ヤWrap atユ item in the
preferences dialog (initially 80).
Autowrap
Toggles autowrap mode on or off. The icon at the bottom left of the window
indicates the mode. Clicking on the icon will change states.
□
Preferences...
Displays a dialog box to allow changing of default preferences. Font, size,
creator and spaces per tab can be set. The radio buttons and check boxes
are covered below.
Strip LF
Selecting the Strip LF option removes the linefeeds when the files are read
in.
SmartStrip
SmartStrip is an intelligent linefeed remover in which linefeeds are
removed when the file is read and replaced (after each CR or replacing each
CR - depending on the input format) when the file is written back. The
default option is SmartStrip.
Donユt Strip
Donユt remove any linefeeds on file open.
Horizontal
Vertical
Sets the default new window horizontal and vertical size. The ヤMax Screen
Sizeユ button puts the size of the current screen in these items. Checking
the ヤUse monitor sizeユ box disregards the horizontal and vertical size
settings and makes all new windows open to full monitor screen size (which
is the default case).
Auto Indent
Toggles automatic indentation of text (useful for programmers). Default is
autoindent on.
New Untitled
If selected, displays an Untitled window when starting Edit II (next time
of course). Default is on.
Print Headers
If selected will print informative header information at the top of every
page. Default is to print these headers.
Cursor Jump
Uses the ヤ-ユ key on the keypad to invoke the cursor jump feature (see
later). Default is on.
Auto Wrap on Open
Automatically wraps the text file to the default window wrap column (see
below) when opened. Very useful for reading TeachText files. Default is
off.
Autowrap
Automatically wraps text at the first space typed after the window wrap
column. The ヤWrap atユ box is the default value of the wrap column for new
windows (initial value is 80). Autowrap defaults to off.
Save Preferences Button
Saves the option settings (all the items in the preferences box) into the
EditPrefs file which is stored in the Preferences folder of the System
Folder.
Windows menu
Layer
Layers all the windows neatly on the screen. The previous frontmost window
is brought to the front.
Tile
Tiles all the windows neatly on the screen. The previous frontmost window
is selected. This option is active for 9 or less windows.
Close All
Save All
Closes (or saves) all the displayed windows. Saving does not close any
windows. Any untitled windows will be ヤsaved asユ. You may notice ヤweirdユ
command key equivalents for Close All (cmd-キ) and Save All (cmd-ァ). It
turns out that キ is the same as ヤoption-Wユ while ァ is the same as
ヤoption-Sユ. Thus, Close All is ヤcmd-option-Wユ while Save All is
ヤcmd-option-Sユ.
<window name list>
Each of the window names appears here for rapid selection. The first 9
windows have command key equivalents ヤcommand-1ユ through ヤcommand-9ユ. Edit
II can now handle unlimited windows (subject to available system memory set
aside for it of course).
3. Keyboard Frolics
Cursor keys on the Macintosh Plus and above now work. Pressing the shift
key extends the selection. In addition, if you have an extended keyboard,
then the extra keys between the main keys and keypad also work as follows:
page up
option-up arrow
Moves to the previous screenful of text without changing the insertion
point.
page down
option-down arrow
Moves to the next screenful of text without changing the insertion point.
option-right arrow
Moves the insertion point to the end of the word (or next one).
option-left arrow
Moves the insertion point to the start of the word (or previous one).
home
command-up arrow
Moves the insertion point to the beginning of the file.
end
command-down arrow
Moves the insertion point to the end of the file.
command-right arrow
Moves the insertion point to the end of the line.
command-left arrow
Moves the insertion point to the start of the line.
del (delete to right)
Deletes the character to the right of the insertion point.
enter (on keypad)
Scrolls to the insertion point.
- (on keypad)
Jumps around the five insertion points last clicked at. Note that
double-clicking to select a word counts as two insertion points (a quirk of
Cappsユ) and that Edit II will cycle through all five points, even though
they are the same (like at the beginning). So if the insertion point seems
stuck, keep on pressing ヤ-ユ! Note that this can be turned off in the
Preferences dialog.
F1ミF4
Undo, Cut, Copy and Paste.
option-return
If autoindent mode is on, then hitting option-return will move the
insertion point to the start of the next line and not to do any
autoindenting for that line.
You can also toggle the special cursor pad mode by hitting the num lock key
on the numeric keypad. The num lock light on the keyboard will go off
(indicating that the numeric keypad is now in cursor mode). This displays
an additional (disabled) menu called CursorPad. The keys on the numeric
keypad now take on special functionality as given below (like the I*M
keypad):
□
4. GREP searching and replacement
GREP searching can be now done using regular expressions like the Unix GREP
tool. Pattern matching of regular expressions is carried out as follows:
Patterns (regular expressions)
1. Any non-special character is a regular expression which matches itself.
Characters [ ] ¥ and . are special characters and should be preceded by ¥
(see rule 4).
2. A regular expression can be concatenated with another regular
expression.
3. The . (period) is a special character which matches any one character.
4. The ¥ followed by any character except ( ) < > or one of the digits 1-9
is a regular expression which matches that character.
5. A string of characters s surrounded by brackets [ ] forms a regular
expression that exactly matches any one of the characters in s. The
regular expression [^ァ] matches any character not in the string ァ. If a
sequence of 3 characters a-b occurs in the string, then this represents all
the characters from a to b inclusive.
6. A regular expression R followed by * forms a regular expression which
matches zero or more occurrences of R.
7. A regular expression surrounded by ¥( and ¥) matches whatever the
regular expression matches.
8. A ¥ followed by a digit n 1 to 9 is a regular expression which matches
whatever the nth subexpression surrounded by ¥( ¥) matches.
9. A regular expression surrounded by ¥< and ¥> constrains the match to
occur when the regular expression is immediately preceded and followed by
characters which do not match [A-Za-z0-9_] and the first and last
characters match [A-Za-z0-9_]. This allows us to look for "words".
10. A regular expression which starts with ^ anchors the search pattern to
the start of a line. The ^ appearing anywhere else in the regular
expression will match the character ^.
11. A regular expression ending in $ will anchor the search pattern to the
end of a line. The $ appearing anywhere else in the regular expression will
match the $.
Replacements
1. Each occurrence of & in the replacement string will be substituted with
whatever was last matched by the regular expression.
2. Each occurrence of the form ¥n where n is a digit 1 to 9 will substitute
whatever was matched by the nth subexpression enclosed in ¥( and ¥).
3. Each occurrence of the form ¥p where p is not a digit 1 to 9 will
substitute that character p.
5. Workarounds and other hints
Edit II can only search for a pattern in a forward direction. If you want
to search backwards, the best workaround is to go back to the start of the
file (home) and then search.
All files are edited in memory. So if you have a large file, reset the size
of the application using Get Info on the Edit II application icon and
change the size of the application memory. Or better still - run under the
Finder (and not MultiFinder). Naturally you shouldnユt edit a 2MB file on a
1MB Mac using Edit II! Try as far as possible to have approximately twice
the memory assigned to Edit II than the total size of all the files you're
editing.
Holding the option key when Edit II is starting up will bring up the
standard file open dialog box for you to select the name of a file to edit.
Edit II will try to save files when memory runs too low but there is no
guarantee that it wonユt crash while doing this. The advice is to frequently
check the available space (see the About Edit II... box to show the current
amount of free memory).
Additional creator names can be inserted into the Creator menu by using
ResEdit (use at your own risk!!). Note that exactly FOUR letters must be
keyed in for each creator name.
Holding the control key when quitting from Edit II will forcibly turn off
the num lock LED (just in case you ever need it!).
Edit II now supports file access permissions. This means that it should be
possible to use Edit II on shared files in a network (I don't think Edit II
itself is shareable on a network but...). The read-only icon is shown on
the bottom left hand side of the window when a read-only file is opened. It
will remain in this state until saved (Edit II automatically prompts for a
new name and will report an access conflict if you try to save the
read-only file back to itself!), whereupon it changes to the read-write
icon. The read-write icon is displayed when a read-write file is opened.
This icon changes to the unsaved-file icon when any changes are made to the
file (as a reminder to save it) and will revert back to the read-write icon
when the file is saved.
□
6. Bug Reports
If you find any bugs with this program, please write to me at the above
address. You can also send electronic mail to me on America OnLine as KSeah
or via Internet as kseah@aol.com or kseah@procyon.austin.tx.us.
7. Warranty
Kenneth Seah hereby disclaims all warranties relating to this software,
whether express or implied, including without limitation any implied
warranties of merchantability or fitness for a particular purpose. Kenneth
Seah will not be liable for any special, incidental, consequential,
indirect or similar damages due to loss of data or any other reason, even
if Kenneth Seah or an agent of his has been advised of the possibility of
such damages. In no event shall Kenneth Seah's liability for any damages
ever exceed the price paid for the license to use software, regardless of
the form of the claim. The person using the software bears all risk as to
the quality and performance of the software.
8. Questionnaire
Copy, print this and fill in the blanks!
REGISTERING FOR: Edit II Version 2.2.1 March 11, 1995
NAME:
ADDRESS:
CITY:
STATE:
ZIP:
ELECTRONIC MAIL ADDRESSES (GEnie, InterNet, Compu$erve, AppleLink, America
OnLine): [For updates and bug reports]
Macintosh you have:
Current version of your System Software:
Comments about Edit II (add more space if desired!):
>>> Don't forget the US$15 shareware fee (add another US$3 if you want the
latest on a disk)<<<